var reversePrint = function(head) {
    let nodes=[]
    while (head!=null) {
        nodes.push(head.val)
        head=head.next
    }
    return nodes.reverse()//倒叙流输出
  };
  